|
|
|
|
|
|
|
rsTableType = dbOpenTable
rsSnapShotType = dbOpenSnapshot
rsDynasetType = dbOpenDynaset
End Enum
'
' button alignments
Enum bbAlign
bbTop = 0
bbBottom = 1
bbLeft = 2
bbRight = 3
End Enum
'
' private property storage
Private strWSName As String ' local workspace name
Private strDBName As String ' local database name
Private strRSName As String ' local recordset name/SQL
Private strIndex As String ' local index name
Private blnIndex As Boolean ' use index flag
Private intBBAlign As Integer ' button aligment
Private strFocus As String ' field to get first focus
'
Private ws As workspace
Private db As Database
Private rs As Recordset
Private intRSType As rsType |
|
|
|
|
|
|
|
|
The first two enumerated values in Listing 10.6 are used throughout the routines to indicate the types of datasets and the location of the button bar set on the form. The rest of the values represent local storage for public properties of your OLE Server class. After you have entered the code in Listing 10.6, save the module as RECOBJECT.CLS. |
|
|
|
|
|
|
|
|
Coding the Property Handling Routines |
|
|
|
|
|
|
|
|
Now that you've created the local storage for the properties, you can use the Tools | Add Procedure menu option to create Public property procedures, too. Listing 10.7 shows the code for all the property-handling routines in the library. Use the Property names as a guide in creating the properties with the Tools | Add Procedure menu and then enter a associated code into each of the Property Let and Get methods. |
|
|
|
|
|
|
|
|
Listing 10.7. Coding the property-handling routines. |
|
|
|
|
|
|
|
|
Public Property Get DBName() As Variant
DBName = strDBName
End Property |
|
|
|
|
|